<template>
  <div class="demo-title">radio/demo6</div>
  <div class="demo">
    <RadioGroup v-model="value" direction="horizontal" class="radio-group">
      <Radio label="1" class="radio">
        Watermelon
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
      <Radio label="2" class="radio">
        Banana
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" /></template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
      <Radio label="3" class="radio">
        Mango
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" /></template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
      <Radio label="4" class="radio">
        Apple
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" /></template>
        <template #checkedIcon>
          <Icon name="checked" color="#e5e6eb" />
        </template>
      </Radio>
      <Radio label="5" class="radio">
        Cherry
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" /></template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
      <Radio label="6" class="radio">
        Kiwi fruit
        <template #icon>
          <Icon name="check-normal" color="#e5e6eb" />
        </template>
        <template #checkedIcon>
          <Icon name="checked" color="#1677ff" />
        </template>
      </Radio>
    </RadioGroup>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import { Radio, RadioGroup } from '@sscd-mobile/radio'
  import Icon from '@sscd-mobile/icon'
  const value = ref('2')
</script>

<style scoped lang="less">
  .demo {
    background: #fff;
    padding: 12px;
    .radio-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-row-gap: 8px;
      .radio {
      }
    }
  }
</style>
